$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER MODE
      INTEGER FG_GETMODE, FG_XVIEW, FG_YVIEW

      CALL FG_INITPM
      MODE = FG_GETMODE()
      CALL FG_SETMODE(19)
      CALL FG_SETCOLOR(15)
      CALL FG_RECT(0,319,0,199)
      CALL FG_WAITKEY

      CALL FG_SETVIEW(0,639,0,399,0,159,0,99)
      CALL FG_SETCOLOR(9)
      CALL FG_RECT(FG_XVIEW(0),FG_XVIEW(639),FG_YVIEW(0),FG_YVIEW(399))
      CALL FG_WAITKEY

      CALL FG_SETVIEW(0,639,0,399,160,319,0,99)
      CALL FG_SETCOLOR(10)
      CALL FG_RECT(FG_XVIEW(0),FG_XVIEW(639),FG_YVIEW(0),FG_YVIEW(399))
      CALL FG_WAITKEY

      CALL FG_SETVIEW(0,639,0,399,0,159,100,199)
      CALL FG_SETCOLOR(11)
      CALL FG_RECT(FG_XVIEW(0),FG_XVIEW(639),FG_YVIEW(0),FG_YVIEW(399))
      CALL FG_WAITKEY

      CALL FG_SETVIEW(0,639,0,399,160,319,100,199)
      CALL FG_SETCOLOR(12)
      CALL FG_RECT(FG_XVIEW(0),FG_XVIEW(639),FG_YVIEW(0),FG_YVIEW(399))
      CALL FG_WAITKEY

      CALL FG_SETMODE(MODE)
      CALL FG_RESET

      STOP ' '
      END
